<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link href="css/mui.css" rel="stylesheet"/>
    <link rel="stylesheet" href="css/mui.min.css">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Hi-dialect</title>
    <link rel="stylesheet" href="css/style.css">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, width=device-width">
    <style type="text/css">
	#hidebg {  z-index: 999;position:absolute;left:0px;top:20px;
	   background-color:#000;
	   width:100%;  /*宽度设置为100%，这样才能使隐藏背景层覆盖原页面*/
	   filter:alpha(opacity=60);  /*设置透明度为60%*/
	   opacity:0.6;  /*非IE浏览器下设置透明度为60%*/
	   display:none; 
	   z-Index:2;}
	#topicSelect{ z-index: 999; position:absolute;width:100%;height:10% ; top:60%;left:0%;background-color:#fff;display:none;cursor:pointer;z-Index:3;}
	#friendSelect{ z-index: 999; position:absolute;width:100%;height:10% ; top:60%;left:0%;background-color:#fff;display:none;cursor:pointer;z-Index:3;}
	.mui-bar 
	{
		background-color:#f2f2f2;
	}
    .mui-table-view-cell:after{
    background-color: #fff;
	}
	.mui-table-view:after{ height:0}
	.mui-table-view:before{ height:0}
	.mui-table-view-cell.mui-active
	{
	background-color: #0062CC;
    }
	.mui-icon-location:before{
		color: #FF0000;
	} 
	

    </style>

</head>
<body style="background: transparent;">

<!-- Page loading -->
<div class="loading">
    <div class="spinner-grow"></div>
</div>
<!-- * Page loading -->

<!-- App Header -->
<div class="appHeader">
    <div class="left">
        <a href="activity-daily-tool.html" class="icon goBack">
            <i class="icon ion-ios-arrow-back"></i>
        </a>
    </div>
    <div class="pageTitle">发布分享</div>
</div>
<!-- App Header -->
<div class="mui-content">
</div>
<video id="video" style="margin-top: 14%;" controls="controls" src="" onplay="false" height="100%"  preload="auto"
       width="100%" onclick="if(/Android/.test(navigator.userAgent))this.play();">
    <!--视频资源放置-->
</video>
<div class="card mb-3 mt-2 ml-1 mr-1">
    <div class="card-body">
        <h5 id="videoTitle" contenteditable="true" class="card-title">俺是reader</h5>
        <p id="videoDescribe" contenteditable="true">蛋黄的长裙，蓬松的头发</p>
        <!-- <input id="videoTitle" type="text" name="firstname" value="John">
        <input id="videoDescrib" type="text" name="firstname" value="John"> -->
        <button id="Topic" onclick="TopicSelect()" type="button"
                class="btn btn-primary btn-sm mr-1 mb-1">#话题
        </button>
        <button id="Friends" onclick="FriendSelect()" type="button"
                class="btn btn-secondary btn-sm mr-1 mb-1">@好友
        </button>
        <button type="button" class="btn btn-success btn-sm mr-1 mb-1">+ 封面</button>
    </div>
</div>
<div class="ml-1 mr-1">
    <!-- <a href="social-home.html" > -->
    <a>
        <button id="pullbutton" onclick="PullVideo()" type="button"
                class="btn btn-primary btn-block">
            发布动态
        </button>
    </a>
</div>
<div id="topicSelect" onclick="hideSelecttopic()">
    <div>
        <a onclick="SelectSucess(this)"
           style="color: #0069D9;position: absolute; margin-top: 3%; margin-left: 5%;">#爱情</a>
        <a onclick="SelectSucess(this)"
           style="color: #0069D9;position: absolute; margin-top: 3%; margin-left: 35%;">#电影</a>
        <a onclick="SelectSucess(this)"
           style="color: #0069D9;position: absolute; margin-top: 3%; margin-left: 65%;">#每日一刻</a>
    </div>
</div>
<div id="friendSelect" onclick="hideSelectfriend()">
    <div>
        <a onclick="FriendSucess(this)"
           style="color: #0069D9;position: absolute; margin-top: 3%; margin-left: 5%;">徐悦皓</a>
        <a onclick="FriendSucess(this)"
           style="color: #0069D9;position: absolute; margin-top: 3%; margin-left: 35%;">冯云浩</a>
        <a onclick="FriendSucess(this)"
           style="color: #0069D9;position: absolute; margin-top: 3%; margin-left: 65%;">舒智文</a>
    </div>
</div>
<div id="hidebg">
    <div id="demo1" style="position: absolute;top: 87%; z-index: 1000;"
         class="mui-progressbar mui-progressbar-infinite">
        <span></span>
    </div>
    <p style="position: absolute; text-align: center;font-size: 20px;margin-left: 30%; top: 80%;">
        视频正在上传中...</p>
    <button onclick="window.location.href ='social-home.html'" type="button"
            style="position: absolute;width: 100%;  top:90%;background-color: red;"
            class="btn btn-danger btn-block">
        跳过等待
    </button>
</div>
<!-- ///////////// Js Files ////////////////////  -->
<!-- Jquery -->
<script src="js/lib/jquery-3.4.1.min.js"></script>
<!-- Bootstrap-->
<script src="js/lib/popper.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<!-- Owl Carousel -->
<script src="js/plugins/owl.carousel.min.js"></script>
<!-- Main Js File -->
<script src="js/app.js"></script>
<script src="js/mui.js"></script>
<script>
		function SelectSucess(target)
		{
			document.getElementById("Topic").innerHTML=target.text;
		}
		
		function hideSelecttopic()  //弹出选择框
		{
		   document.getElementById("topicSelect").style.display="none"; 
		}
		function hideSelectfriend()  //弹出选择框
		{
		   document.getElementById("friendSelect").style.display="none"; 
		}
		function TopicSelect()
		{
			document.getElementById("topicSelect").style.display="block";  //显示弹出层
		}
		function FriendSelect()
		{
			document.getElementById("friendSelect").style.display="block";  //显示弹出层
		}
		function FriendSucess(target)
		{
			
			document.getElementById("videoDescribe").innerHTML+="@"+target.text;
		}
		function PullVideo()//上传视频
		{
		    var Title=document.getElementById("videoTitle");
            var Describe=document.getElementById("videoDescribe");
			var hideobj=document.getElementById("hidebg");
			hidebg.style.display="block";  //显示隐藏层
			hidebg.style.height="100%";  //设置隐藏层的高度为当前页面高度
            let labels=[82868,83582,84270];
			var data=1;
			getVideoUploadResult(data);
		    android.uploadVideoToServer(vPath,Title.innerHTML,Describe.innerHTML,"",57176,1,labels);
		}
		function getVideoUploadResult(isSuccses)
		{
			if(isSuccses==1||isSuccses=="1")
			{
				document.getElementById("hidebg").style.display="none";
				mui.alert('已上传!!!','','确定',function (e) {
				   window.location.href="social-home.html"
				},'div')	
			
			}
			else
			{
				
			}
		}

</script>
<script>
		var vPath=sessionStorage.getItem("videoPath");
		document.getElementById("video").src = vPath;

    </script>
</body>

</html>
